package com.sk.cardeal.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sk.cardeal.R;
import com.sk.cardeal.entity.SettlementList;

import java.util.List;

/**
 * Created by sk on 2018/4/17.
 */

public class SettlementAdapter extends BaseQuickAdapter<SettlementList.ResultListBean,BaseViewHolder> {

    public SettlementAdapter(int layoutResId, @Nullable List<SettlementList.ResultListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SettlementList.ResultListBean item) {
         helper.setText(R.id.order_num,"工单号："+item.getCode())
                 .setText(R.id.car_num,item.getCarNumber())
                 .setText(R.id.tv_type,item.getRepairName() == null ? "暂无" : item.getRepairName())
                 .setText(R.id.tv_time,item.getCreateTime());
    }
}
